from django.contrib import admin
from .models import Post, Answer, MRCAnswer


class PostAdmin(admin.ModelAdmin):
    search_fields = ('question',)
    list_display = ('question', 'author')
    list_filter = ('date_posted',)

class AnswerAdmin(admin.ModelAdmin):
    search_fields = ('context',)
    list_display = ('question', 'author')
    list_filter = ('author', )

class MRCAnswerAdmin(admin.ModelAdmin):
    search_fields = ('context',)
    list_display = ('question', )

admin.site.register(Post, PostAdmin)
admin.site.register(Answer, AnswerAdmin)
admin.site.register(MRCAnswer, MRCAnswerAdmin)

